package com.btest.controler;

import java.util.concurrent.atomic.AtomicLong;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.btest.entity.User;

@RestController
@RequestMapping(value="/users")
public class UserControler {

	@RequestMapping("/getUser")
	public User getUser(@RequestParam(value="name", defaultValue="Finley") String name)
	{
		return new User(counter.incrementAndGet(),name);
	}
	
	 private final AtomicLong counter = new AtomicLong();
}
